Integrand size = 28, antiderivative size = 119 \[ \int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\frac {a^3 \log (\cos (c+d x))}{d}-\frac {3 a^2 b \sec (c+d x)}{d}+\frac {a \left (a^2-3 b^2\right ) \sec ^2(c+d x)}{2 d}+\frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}+\frac {3 a b^2 \sec ^4(c+d x)}{4 d}+\frac {b^3 \sec ^5(c+d x)}{5 d} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4482, 2916, 12, 908} \[ \int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\frac {a^3 \log (\cos (c+d x))}{d}+\frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}+\frac {a \left (a^2-3 b^2\right ) \sec ^2(c+d x)}{2 d}-\frac {3 a^2 b \sec (c+d x)}{d}+\frac {3 a b^2 \sec ^4(c+d x)}{4 d}+\frac {b^3 \sec ^5(c+d x)}{5 d} \]
[In]
[Out]
Rule 12
Rule 908
Rule 2916
Rule 4482
Rubi steps \begin{align*} \text {integral}& = \int (b+a \cos (c+d x))^3 \sec ^3(c+d x) \tan ^3(c+d x) \, dx \\ & = -\frac {\text {Subst}\left (\int \frac {a^6 (b+x)^3 \left (a^2-x^2\right )}{x^6} \, dx,x,a \cos (c+d x)\right )}{a^3 d} \\ & = -\frac {a^3 \text {Subst}\left (\int \frac {(b+x)^3 \left (a^2-x^2\right )}{x^6} \, dx,x,a \cos (c+d x)\right )}{d} \\ & = -\frac {a^3 \text {Subst}\left (\int \left (\frac {a^2 b^3}{x^6}+\frac {3 a^2 b^2}{x^5}+\frac {3 a^2 b-b^3}{x^4}+\frac {a^2-3 b^2}{x^3}-\frac {3 b}{x^2}-\frac {1}{x}\right ) \, dx,x,a \cos (c+d x)\right )}{d} \\ & = \frac {a^3 \log (\cos (c+d x))}{d}-\frac {3 a^2 b \sec (c+d x)}{d}+\frac {a \left (a^2-3 b^2\right ) \sec ^2(c+d x)}{2 d}+\frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}+\frac {3 a b^2 \sec ^4(c+d x)}{4 d}+\frac {b^3 \sec ^5(c+d x)}{5 d} \\ \end{align*}
Time = 0.50 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.83 \[ \int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\frac {60 a^3 \log (\cos (c+d x))-180 a^2 b \sec (c+d x)+30 a \left (a^2-3 b^2\right ) \sec ^2(c+d x)-20 b \left (-3 a^2+b^2\right ) \sec ^3(c+d x)+45 a b^2 \sec ^4(c+d x)+12 b^3 \sec ^5(c+d x)}{60 d} \]
[In]
[Out]
Time = 3.87 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.92
method | result | size |
derivativedivides | \(\frac {\frac {b^{3} \sec \left (d x +c \right )^{5}}{5}+\frac {3 a \,b^{2} \sec \left (d x +c \right )^{4}}{4}+a^{2} b \sec \left (d x +c \right )^{3}-\frac {b^{3} \sec \left (d x +c \right )^{3}}{3}+\frac {a^{3} \sec \left (d x +c \right )^{2}}{2}-\frac {3 a \,b^{2} \sec \left (d x +c \right )^{2}}{2}-3 a^{2} b \sec \left (d x +c \right )-a^{3} \ln \left (\sec \left (d x +c \right )\right )}{d}\) | \(110\) |
default | \(\frac {\frac {b^{3} \sec \left (d x +c \right )^{5}}{5}+\frac {3 a \,b^{2} \sec \left (d x +c \right )^{4}}{4}+a^{2} b \sec \left (d x +c \right )^{3}-\frac {b^{3} \sec \left (d x +c \right )^{3}}{3}+\frac {a^{3} \sec \left (d x +c \right )^{2}}{2}-\frac {3 a \,b^{2} \sec \left (d x +c \right )^{2}}{2}-3 a^{2} b \sec \left (d x +c \right )-a^{3} \ln \left (\sec \left (d x +c \right )\right )}{d}\) | \(110\) |
risch | \(-i a^{3} x -\frac {2 i a^{3} c}{d}+\frac {-6 a^{2} b \,{\mathrm e}^{9 i \left (d x +c \right )}+2 a^{3} {\mathrm e}^{8 i \left (d x +c \right )}-6 a \,b^{2} {\mathrm e}^{8 i \left (d x +c \right )}-16 a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}-\frac {8 b^{3} {\mathrm e}^{7 i \left (d x +c \right )}}{3}+6 a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-6 a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-20 a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}+\frac {16 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}}{15}+6 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-6 a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-16 a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}-\frac {8 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}}{3}+2 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-6 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-6 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(290\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.92 \[ \int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\frac {60 \, a^{3} \cos \left (d x + c\right )^{5} \log \left (-\cos \left (d x + c\right )\right ) - 180 \, a^{2} b \cos \left (d x + c\right )^{4} + 45 \, a b^{2} \cos \left (d x + c\right ) + 30 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 12 \, b^{3} + 20 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2}}{60 \, d \cos \left (d x + c\right )^{5}} \]
[In]
[Out]
\[ \int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\int \left (a \sin {\left (c + d x \right )} + b \tan {\left (c + d x \right )}\right )^{3} \sec ^{3}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.08 \[ \int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=-\frac {30 \, a^{3} {\left (\frac {1}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} - \frac {45 \, {\left (2 \, \sin \left (d x + c\right )^{2} - 1\right )} a b^{2}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} + \frac {60 \, {\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} a^{2} b}{\cos \left (d x + c\right )^{3}} + \frac {4 \, {\left (5 \, \cos \left (d x + c\right )^{2} - 3\right )} b^{3}}{\cos \left (d x + c\right )^{5}}}{60 \, d} \]
[In]
[Out]
Exception generated. \[ \int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Time = 26.30 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.85 \[ \int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=-\frac {2\,a^3\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (6\,a^3+12\,a^2\,b-12\,a\,b^2+4\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-6\,a^3-28\,a^2\,b+12\,a\,b^2+\frac {4\,b^3}{3}\right )-2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,a^2\,b+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^3+20\,a^2\,b+\frac {4\,b^3}{3}\right )-\frac {4\,b^3}{15}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]
[In]
[Out]